package sheshen.come.cn.sheshen;

import android.app.Application;

import sheshen.come.cn.sheshen.been.User;
import sheshen.come.cn.sheshen.utils.Tools;

/**
 * Created by MyPC on 2017/2/23.
 */

public class MyApplication extends Application {
    private static  MyApplication application;
    public User user;
    public String id;
    @Override
    public void onCreate() {
        super.onCreate();
        application = this;
        init();
    }
    private void init(){
        //注册Tools
        Tools.setContext(application);
    }
    public static MyApplication getContext(){
        return application;
    }
    public  boolean isLogin(){
        return user==null ?false:true;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
